home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Hardcore Visual Basic 5.0 (2nd Edition)
/
Hardcore Visual Basic 5.0 - Second Edition (1997)(Microsoft Press).iso
/
Source
/
Cpp4VB
/
WINTLB
/
WINMSG.ODL
< prev
next >
Wrap
Text File
|
1996-02-27
|
32KB
|
1,002 lines
[
uuid(5467404C-3A82-101B-8181-00AA003743D3),
helpstring("Windows Messages"),
#ifdef WIN32
dllname("USER32.DLL")
#else
dllname("USER.EXE")
#endif
]
module WinMessage {
[
#ifdef WIN32
usesgetlasterror,
entry("SendMessageA"),
#else
entry("SendMessage"),
#endif
helpstring("Sends a Windows message (LPARAM as Long)")
]
LRESULT WINAPI SendMessageAsLong([in] HWND hwnd, [in] UINT uMsg,
[in] WPARAM wParam,
[in] LONG lParam);
//@B SendMessages
[
#ifdef WIN32
usesgetlasterror,
entry("SendMessageA"),
#else
entry("SendMessage"),
#endif
helpstring("Sends a Windows message (LPARAM as String)")
]
LRESULT WINAPI SendMessageAsStr([in] HWND hwnd, [in] UINT uMsg,
[in] WPARAM wParam,
[in, out] LPSTR lParam);
[
#ifdef WIN32
usesgetlasterror,
entry("SendMessageA"),
#else
entry("SendMessage"),
#endif
helpstring("Sends a Windows message (LPARAM as Long pointer)")
]
LRESULT WINAPI SendMessageAsLp([in] HWND hwnd, [in] UINT uMsg,
[in] WPARAM wParam,
[in] LONG lParam);
[
#ifdef WIN32
usesgetlasterror,
entry("SendMessageA"),
#else
entry("SendMessage"),
#endif
helpstring("Sends a Windows message (LPARAM as ByRef Long or Long array)")
]
LRESULT WINAPI SendMessageForLong([in] HWND hwnd, [in] UINT uMsg,
[in] WPARAM wParam,
[in, out] LONG * lParam);
//@E SendMessages
[
#ifdef WIN32
usesgetlasterror,
entry("SendMessageA"),
helpstring("Sends a Windows message (LPARAM as ByRef SysInt (Long) or array of SysInts)")
#else
entry("SendMessage"),
helpstring("Sends a Windows message (LPARAM as ByRef SysInt (Integer) or array of SysInts)")
#endif
]
LRESULT WINAPI SendMessageForInt([in] HWND hwnd, [in] UINT uMsg,
[in] WPARAM wParam,
[in, out] UINT * lParam);
[
#ifdef WIN32
usesgetlasterror,
entry("SendMessageA"),
#else
entry("SendMessage"),
#endif
helpstring("Sends a Windows message (LPARAM as ByRef Byte or array of Bytes)")
]
LRESULT WINAPI SendMessageForByte([in] HWND hwnd,
[in] UINT uMsg,
[in] WPARAM wParam,
[in, out] BYTE * lParam);
[
#ifdef WIN32
usesgetlasterror,
entry("PostMessageA"),
#else
entry("PostMessage"),
#endif
helpstring("Posts message to Windows queue (LPARAM as Long)")
]
BOOL WINAPI PostMessageAsLong([in] HWND hwnd, [in] UINT uMsg,
[in] WPARAM wParam,
[in] LONG lParam);
[
#ifdef WIN32
usesgetlasterror,
entry("PostMessageA"),
#else
entry("PostMessage"),
#endif
helpstring("Posts message to Windows queue (LPARAM as String)")
]
BOOL WINAPI PostMessageAsStr([in] HWND hwnd, [in] UINT uMsg,
[in] WPARAM wParam,
[in, out] LPSTR lParam);
[
#ifdef WIN32
usesgetlasterror,
entry("PostMessageA"),
#else
entry("PostMessage"),
#endif
helpstring("Posts message to Windows queue (LPARAM as Long pointer)")
]
BOOL WINAPI PostMessageAsLp([in] HWND hwnd, [in] UINT uMsg,
[in] WPARAM wParam,
[in] LONG lParam);
[
#ifdef WIN32
usesgetlasterror,
entry("PostMessageA"),
#else
entry("PostMessage"),
#endif
helpstring("Posts message to Windows queue (LPARAM as ByRef Long or Long array)")
]
BOOL WINAPI PostMessageForLong([in] HWND hwnd, [in] UINT uMsg,
[in] WPARAM wParam,
[in, out] LONG * lParam);
[
#ifdef WIN32
usesgetlasterror,
entry("PostMessageA"),
helpstring("Posts message to Windows queue (LPARAM as ByRef SysInt (Long) or array of SysInts)")
#else
entry("PostMessage"),
helpstring("Posts message to Windows queue (LPARAM as ByRef SysInt (Integer) or array of SysInts)")
#endif
]
BOOL WINAPI PostMessageForInt([in] HWND hwnd, [in] UINT uMsg,
[in] WPARAM wParam,
[in, out] UINT * lParam);
[
#ifdef WIN32
usesgetlasterror,
entry("PostMessageA"),
#else
entry("PostMessage"),
#endif
helpstring("Posts message to Windows queue (LPARAM as ByRef Byte or array of Bytes)")
]
BOOL WINAPI PostMessageForByte([in] HWND hwnd,
[in] UINT uMsg,
[in] WPARAM wParam,
[in, out] BYTE * lParam);
/*
BOOL WINAPI PostAppMessage(HTASK, UINT, WPARAM, LPARAM);
void WINAPI PostQuitMessage(int);
*/
[
usesgetlasterror,
entry("RegisterWindowMessageA"),
helpstring("Defines window message guaranteed to be unique"),
]
UINT WINAPI RegisterWindowMessage([in] LPSTR lpsz);
/*
// Queued message structure
typedef struct tagMSG
{
HWND hwnd;
UINT message;
WPARAM wParam;
LPARAM lParam;
DWORD time;
POINT pt;
} MSG;
typedef MSG* PMSG;
typedef MSG NEAR* NPMSG;
typedef MSG FAR* LPMSG;
BOOL WINAPI GetMessage(MSG FAR*, [in] HWND hwnd, UINT, UINT);
BOOL WINAPI PeekMessage(MSG FAR*, [in] HWND hwnd, UINT, UINT, UINT);
void WINAPI WaitMessage(void);
DWORD WINAPI GetMessagePos(void);
LONG WINAPI GetMessageTime(void);
LPARAM WINAPI GetMessageExtraInfo(void);
BOOL WINAPI TranslateMessage(const MSG FAR*);
LONG WINAPI DispatchMessage(const MSG FAR*);
BOOL WINAPI SetMessageQueue(int);
BOOL WINAPI GetInputState(void);
DWORD WINAPI GetQueueStatus(UINT flags);
*/
/*
void WINAPI ReplyMessage(LRESULT);
BOOL WINAPI InSendMessage(void);
// Special HWND value for use with PostMessage() and SendMessage()
BOOL WINAPI CallMsgFilter(MSG FAR*, int);
*/
/*
// PeekMessage() options
const int PM_NOREMOVE = 0x0000;
const int PM_REMOVE = 0x0001;
const int PM_NOYIELD = 0x0002;
// GetQueueStatus flags
const int QS_KEY = 0x0001;
const int QS_MOUSEMOVE = 0x0002;
const int QS_MOUSEBUTTON = 0x0004;
const int QS_MOUSE = 0x0006; // (QS_MOUSEMOVE | QS_MOUSEBUTTON)
const int QS_POSTMESSAGE = 0x0008;
const int QS_TIMER = 0x0010;
const int QS_PAINT = 0x0020;
const int QS_SENDMESSAGE = 0x0040;
const int QS_ALLINPUT = 0x007f;
*/
const int HWND_BROADCAST =-1;
const int WM_NULL = 0x0000;
const int WM_WININICHANGE = 0x001A;
const int WM_SYSCOLORCHANGE = 0x0015;
// Palette window messages
const int WM_QUERYNEWPALETE = 0x030F;
const int WM_PALETTEISCHANGING = 0x0310;
const int WM_PALETTECHANGED = 0x0311;
// Spooler status notification message
const int WM_SPOOLERSTATUS = 0x002A;
const int WM_DEVMODECHANGE = 0x001B;
const int WM_TIMECHANGE = 0x001E;
const int WM_SHOWWINDOW = 0x0018;
// WM_SHOWWINDOW wParam codes
const int SW_PARENTCLOSING = 1;
const int SW_OTHERMAXIMIZED= 2;
const int SW_PARENTOPENING = 3;
const int SW_OTHERRESTORED = 4;
/* Obsolete constant names
const int SW_OTHERZOOM = SW_OTHERMAXIMIZED;
const int SW_OTHERUNZOOM = SW_OTHERRESTORED;
*/
// Dialog messages
const int DM_GETDEFID = WM_USER+0;
const int DM_SETDEFID = WM_USER+1;
// Returned in HIWORD() of DM_GETDEFID result if msg is supported
const int DC_HASDEFID = 0x534B;
// Static Control Mesages
#ifdef WIN32
const int STM_SETICON = 0x0170;
const int STM_GETICON = 0x0171;
#else
const int STM_SETICON = WM_USER+0;
const int STM_GETICON = WM_USER+1;
#endif
// PenWindows specific messages
const int WM_PENWINFIRST = 0x0380;
const int WM_PENWINLAST = 0x038F;
// Coalescing messages
const int WM_COALESCE_FIRST = 0x0390;
const int WM_COALESCE_LAST = 0x039F;
const int WM_POWER = 0x0048;
// wParam for WM_POWER window message and DRV_POWER driver notification
const int PWR_OK = 1;
const int PWR_FAIL = -1;
const int PWR_SUSPENDREQUEST = 1;
const int PWR_SUSPENDRESUME = 2;
const int PWR_CRITICALRESUME = 3;
// ****** Application termination *******
const int WM_QUERYENDSESSION = 0x0011;
const int WM_ENDSESSION = 0x0016;
const int WM_QUIT = 0x0012;
const int WM_SYSTEMERROR = 0x0017;
const int WM_CREATE = 0x0001;
const int WM_NCCREATE = 0x0081;
/* Omit WM_CREATE/WM_NCCREATE lParam struct
typedef struct tagCREATESTRUCT
{
void FAR* lpCreateParams;
HINSTANCE hInstance;
HMENU hMenu;
HWND hwndParent;
int cy;
int cx;
int y;
int x;
LONG style;
LPCSTR lpszName;
LPCSTR lpszClass;
DWORD dwExStyle;
} CREATESTRUCT;
typedef CREATESTRUCT FAR* LPCREATESTRUCT;
*/
const int WM_DESTROY = 0x0002;
const int WM_NCDESTROY = 0x0082;
const int WM_SETTEXT = 0x000C;
const int WM_GETTEXT = 0x000D;
const int WM_GETTEXTLENGTH = 0x000E;
const int WM_SETREDRAW = 0x000B;
const int WM_ENABLE = 0x000A;
const int WM_WINDOWPOSCHANGING = 0x0046;
const int WM_WINDOWPOSCHANGED = 0x0047;
/* Omit WM_WINDOWPOSCHANGING/CHANGED struct pointed to by lParam
typedef struct tagWINDOWPOS
{
HWND hwnd;
HWND hwndInsertAfter;
int x;
int y;
int cx;
int cy;
UINT flags;
} WINDOWPOS;
typedef WINDOWPOS FAR* LPWINDOWPOS;
*/
const int WM_MOVE = 0x0003;
const int WM_SIZE = 0x0005;
// WM_SIZE message wParam values
const int SIZE_RESTORED = 0;
const int SIZE_MINIMIZED = 1;
const int SIZE_MAXIMIZED = 2;
const int SIZE_MAXSHOW = 3;
const int SIZE_MAXHIDE = 4;
const int WM_QUERYOPEN = 0x0013;
const int WM_CLOSE = 0x0010;
/* Omit Struct pointed to by WM_GETMINMAXINFO lParam
typedef struct tagMINMAXINFO
{
POINT ptReserved;
POINT ptMaxSize;
POINT ptMaxPosition;
POINT ptMinTrackSize;
POINT ptMaxTrackSize;
} MINMAXINFO;
*/
const int WM_GETMINMAXINFO = 0x0024;
const int WM_PAINT = 0x000F;
const int WM_ERASEBKGND = 0x0014;
const int WM_ICONERASEBKGND = 0x0027;
// ****** Non-client window area management ********
const int WM_NCPAINT = 0x0085;
const int WM_NCCALCSIZE = 0x0083;
// WM_NCCALCSIZE return flags
const int WVR_ALIGNTOP = 0x0010;
const int WVR_ALIGNLEFT = 0x0020;
const int WVR_ALIGNBOTTOM = 0x0040;
const int WVR_ALIGNRIGHT = 0x0080;
const int WVR_HREDRAW = 0x0100;
const int WVR_VREDRAW = 0x0200;
const int WVR_REDRAW = 0x0300; // (WVR_HREDRAW | WVR_VREDRAW);
const int WVR_VALIDRECTS = 0x0400;
/* WM_NCCALCSIZE parameter structure
typedef struct tagNCCALCSIZE_PARAMS
{
RECT rgrc[3];
WINDOWPOS FAR* lppos;
} NCCALCSIZE_PARAMS;
typedef struct tagNCCALCSIZE_PARAMS
{
RECT rgrc[2];
} NCCALCSIZE_PARAMS;
typedef NCCALCSIZE_PARAMS FAR* LPNCCALCSIZE_PARAMS;
*/
const int WM_NCHITTEST = 0x0084;
// WM_NCHITTEST return codes
const int HTERROR = -2;
const int HTTRANSPARENT = -1;
const int HTNOWHERE = 0;
const int HTCLIENT = 1;
const int HTCAPTION = 2;
const int HTSYSMENU = 3;
const int HTSIZE = 4;
const int HTMENU = 5;
const int HTHSCROLL = 6;
const int HTVSCROLL = 7;
const int HTMINBUTTON = 8;
const int HTMAXBUTTON = 9;
const int HTLEFT = 10;
const int HTRIGHT = 11;
const int HTTOP = 12;
const int HTTOPLEFT = 13;
const int HTTOPRIGHT = 14;
const int HTBOTTOM = 15;
const int HTBOTTOMLEFT = 16;
const int HTBOTTOMRIGHT = 17;
const int HTBORDER = 18;
const int HTGROWBOX = 4; // HTSIZE;
const int HTREDUCE = 8; // HTMINBUTTON;
const int HTZOOM = 9; // HTMAXBUTTON;
// ******* Drag-and-drop support *******
const int WM_QUERYDRAGICON = 0x0037;
const int WM_DROPFILES = 0x0233;
// WM_ACTIVATE state values
const int WA_INACTIVE = 0;
const int WA_ACTIVE = 1;
const int WA_CLICKACTIVE = 2;
const int WM_ACTIVATE = 0x0006;
const int WM_ACTIVATEAPP = 0x001C;
const int WM_NCACTIVATE = 0x0086;
const int WM_SETFOCUS = 0x0007;
const int WM_KILLFOCUS = 0x0008;
const int WM_KEYDOWN = 0x0100;
const int WM_KEYUP = 0x0101;
const int WM_CHAR = 0x0102;
const int WM_DEADCHAR = 0x0103;
const int WM_SYSKEYDOWN = 0x0104;
const int WM_SYSKEYUP = 0x0105;
const int WM_SYSCHAR = 0x0106;
const int WM_SYSDEADCHAR = 0x0107;
// Keyboard message range
const int WM_KEYFIRST = 0x0100;
const int WM_KEYLAST = 0x0108;
// WM_KEYUP/DOWN/CHAR HIWORD(lParam) flags
const long KF_EXTENDED = 0x0100;
const long KF_DLGMODE = 0x0800;
const long KF_MENUMODE = 0x1000;
const long KF_ALTDOWN = 0x2000;
const long KF_REPEAT = 0x4000;
const long KF_UP = 0x8000;
// Mouse input messages
const int WM_MOUSEMOVE = 0x0200;
const int WM_LBUTTONDOWN = 0x0201;
const int WM_LBUTTONUP = 0x0202;
const int WM_LBUTTONDBLCLK = 0x0203;
const int WM_RBUTTONDOWN = 0x0204;
const int WM_RBUTTONUP = 0x0205;
const int WM_RBUTTONDBLCLK = 0x0206;
const int WM_MBUTTONDOWN = 0x0207;
const int WM_MBUTTONUP = 0x0208;
const int WM_MBUTTONDBLCLK = 0x0209;
// Mouse input message range
const int WM_MOUSEFIRST = 0x0200;
const int WM_MOUSELAST = 0x0209;
// Mouse message wParam key states
const int MK_LBUTTON = 0x0001;
const int MK_RBUTTON = 0x0002;
const int MK_SHIFT = 0x0004;
const int MK_CONTROL = 0x0008;
const int MK_MBUTTON = 0x0010;
// Non-client mouse messages
const int WM_NCMOUSEMOVE = 0x00A0;
const int WM_NCLBUTTONDOWN = 0x00A1;
const int WM_NCLBUTTONUP = 0x00A2;
const int WM_NCLBUTTONDBLCLK = 0x00A3;
const int WM_NCRBUTTONDOWN = 0x00A4;
const int WM_NCRBUTTONUP = 0x00A5;
const int WM_NCRBUTTONDBLCLK = 0x00A6;
const int WM_NCMBUTTONDOWN = 0x00A7;
const int WM_NCMBUTTONUP = 0x00A8;
const int WM_NCMBUTTONDBLCLK = 0x00A9;
// Mouse click activation support
const int WM_MOUSEACTIVATE = 0x0021;
// WM_MOUSEACTIVATE return codes
const int MA_ACTIVATE = 1;
const int MA_ACTIVATEANDEAT = 2;
const int MA_NOACTIVATE = 3;
const int MA_NOACTIVATEANDEAT = 4;
// ****** Mode control *********
const int WM_CANCELMODE = 0x001F;
const int WM_TIMER = 0x0113;
// Menu messages
const int WM_INITMENU = 0x0116;
const int WM_INITMENUPOPUP = 0x0117;
const int WM_MENUSELECT = 0x011F;
const int WM_MENUCHAR = 0x0120;
// Menu and control command messages
const int WM_COMMAND = 0x0111;
// ****** Scroll bar support ***
const int WM_HSCROLL = 0x0114;
const int WM_VSCROLL = 0x0115;
// WM_H/VSCROLL commands
const int SB_LINEUP = 0;
const int SB_LINELEFT = 0;
const int SB_LINEDOWN = 1;
const int SB_LINERIGHT = 1;
const int SB_PAGEUP = 2;
const int SB_PAGELEFT = 2;
const int SB_PAGEDOWN = 3;
const int SB_PAGERIGHT = 3;
const int SB_THUMBPOSITION = 4;
const int SB_THUMBTRACK = 5;
const int SB_TOP = 6;
const int SB_LEFT = 6;
const int SB_BOTTOM = 7;
const int SB_RIGHT = 7;
const int SB_ENDSCROLL = 8;
// Clipboard command messages
const int WM_CUT = 0x0300;
const int WM_COPY = 0x0301;
const int WM_PASTE = 0x0302;
const int WM_CLEAR = 0x0303;
const int WM_UNDO = 0x0304;
// Clipboard owner messages
const int WM_RENDERFORMAT = 0x0305;
const int WM_RENDERALLFORMATS = 0x0306;
const int WM_DESTROYCLIPBOARD = 0x0307;
// Clipboard viewer messages
const int WM_DRAWCLIPBOARD = 0x0308;
const int WM_PAINTCLIPBOARD = 0x0309;
const int WM_SIZECLIPBOARD = 0x030B;
const int WM_VSCROLLCLIPBOARD = 0x030A;
const int WM_HSCROLLCLIPBOARD = 0x030E;
const int WM_ASKCBFORMATNAME = 0x030C;
const int WM_CHANGECBCHAIN = 0x030D;
const int WM_SETCURSOR = 0x0020;
// ****** WM_SYSCOMMAND support
const int WM_SYSCOMMAND = 0x0112;
// System Menu Command Values
const long SC_SIZE = 0xF000;
const long SC_MOVE = 0xF010;
const long SC_MINIMIZE = 0xF020;
const long SC_MAXIMIZE = 0xF030;
const long SC_NEXTWINDOW = 0xF040;
const long SC_PREVWINDOW = 0xF050;
const long SC_CLOSE = 0xF060;
const long SC_VSCROLL = 0xF070;
const long SC_HSCROLL = 0xF080;
const long SC_MOUSEMENU = 0xF090;
const long SC_KEYMENU = 0xF100;
const long SC_ARRANGE = 0xF110;
const long SC_RESTORE = 0xF120;
const long SC_TASKLIST = 0xF130;
const long SC_SCREENSAVE = 0xF140;
const long SC_HOTKEY = 0xF150;
/* Obsolete names
const int SC_ICON = SC_MINIMIZE;
const int SC_ZOOM = SC_MAXIMIZE;
*/
// MDI messages
const int WM_MDICREATE = 0x0220;
const int WM_MDIDESTROY = 0x0221;
const int WM_MDIACTIVATE = 0x0222;
const int WM_MDIRESTORE = 0x0223;
const int WM_MDINEXT = 0x0224;
const int WM_MDIMAXIMIZE = 0x0225;
const int WM_MDITILE = 0x0226;
const int WM_MDICASCADE = 0x0227;
const int WM_MDIICONARRANGE = 0x0228;
const int WM_MDIGETACTIVE = 0x0229;
const int WM_MDISETMENU = 0x0230;
/* WM_MDICREATE message structure
typedef struct tagMDICREATESTRUCT
{
LPCSTR szClass;
LPCSTR szTitle;
HINSTANCE hOwner;
int x;
int y;
int cx;
int cy;
DWORD style;
LPARAM lParam;
} MDICREATESTRUCT;
typedef MDICREATESTRUCT FAR* LPMDICREATESTRUCT;
*/
// wParam values for WM_MDITILE and WM_MDICASCADE messages.
const int MDITILE_VERTICAL = 0x0000;
const int MDITILE_HORIZONTAL = 0x0001;
const int MDITILE_SKIPDISABLED = 0x0002;
const int WM_CHILDACTIVATE = 0x0022;
// Dialog notification messages
const int WM_INITDIALOG = 0x0110;
const int WM_NEXTDLGCTL = 0x0028;
const int WM_PARENTNOTIFY = 0x0210;
const int WM_ENTERIDLE = 0x0121;
const int WM_GETDLGCODE = 0x0087;
// dialog codes
const int DLGC_WANTARROWS = 0x0001;
const int DLGC_WANTTAB = 0x0002;
const int DLGC_WANTALLKEYS = 0x0004;
const int DLGC_WANTMESSAGE = 0x0004;
const int DLGC_HASSETSEL = 0x0008;
const int DLGC_DEFPUSHBUTTON = 0x0010;
const int DLGC_UNDEFPUSHBUTTON = 0x0020;
const int DLGC_RADIOBUTTON = 0x0040;
const int DLGC_WANTCHARS = 0x0080;
const int DLGC_STATIC = 0x0100;
const int DLGC_BUTTON = 0x2000;
const int WM_CTLCOLOR = 0x0019;
// WM_CTLCOLOR control IDs
const int CTLCOLOR_MSGBOX = 0;
const int CTLCOLOR_EDIT = 1;
const int CTLCOLOR_LISTBOX = 2;
const int CTLCOLOR_BTN = 3;
const int CTLCOLOR_DLG = 4;
const int CTLCOLOR_SCROLLBAR = 5;
const int CTLCOLOR_STATIC = 6;
const int WM_SETFONT = 0x0030;
const int WM_GETFONT = 0x0031;
const int WM_DRAWITEM = 0x002B;
/*
typedef struct tagDRAWITEMSTRUCT
{
UINT CtlType;
UINT CtlID;
UINT itemID;
UINT itemAction;
UINT itemState;
HWND hwndItem;
HDC hDC;
RECT rcItem;
DWORD itemData;
} DRAWITEMSTRUCT;
typedef DRAWITEMSTRUCT NEAR* PDRAWITEMSTRUCT;
typedef DRAWITEMSTRUCT FAR* LPDRAWITEMSTRUCT;
*/
const int WM_MEASUREITEM = 0x002C;
/*
typedef struct tagMEASUREITEMSTRUCT
{
UINT CtlType;
UINT CtlID;
UINT itemID;
UINT itemWidth;
UINT itemHeight;
DWORD itemData;
} MEASUREITEMSTRUCT;
typedef MEASUREITEMSTRUCT NEAR* PMEASUREITEMSTRUCT;
typedef MEASUREITEMSTRUCT FAR* LPMEASUREITEMSTRUCT;
*/
const int WM_DELETEITEM = 0x002D;
/*
typedef struct tagDELETEITEMSTRUCT
{
UINT CtlType;
UINT CtlID;
UINT itemID;
HWND hwndItem;
DWORD itemData;
} DELETEITEMSTRUCT;
typedef DELETEITEMSTRUCT NEAR* PDELETEITEMSTRUCT;
typedef DELETEITEMSTRUCT FAR* LPDELETEITEMSTRUCT;
*/
const int WM_COMPAREITEM = 0x0039;
/*
typedef struct tagCOMPAREITEMSTRUCT
{
UINT CtlType;
UINT CtlID;
HWND hwndItem;
UINT itemID1;
DWORD itemData1;
UINT itemID2;
DWORD itemData2;
} COMPAREITEMSTRUCT;
typedef COMPAREITEMSTRUCT NEAR* PCOMPAREITEMSTRUCT;
typedef COMPAREITEMSTRUCT FAR* LPCOMPAREITEMSTRUCT;
*/
// Button Control Messages
#ifdef WIN32
#define BM_FIRST 0xF0
#else
#define BM_FIRST WM_USER
#endif
const int BM_GETCHECK = BM_FIRST+0x0;
const int BM_SETCHECK = BM_FIRST+0x1;
const int BM_GETSTATE = BM_FIRST+0x2;
const int BM_SETSTATE = BM_FIRST+0x3;
const int BM_SETSTYLE = BM_FIRST+0x4;
#ifdef WIN32
const int BM_CLICK = BM_FIRST+0x5;
const int BM_GETIMAGE = BM_FIRST+0x6;
const int BM_SETIMAGE = BM_FIRST+0x7;
#endif
// User Button Notification Codes
const int BN_CLICKED = 0;
const int BN_PAINT = 1;
const int BN_HILITE = 2;
const int BN_UNHILITE = 3;
const int BN_DISABLE = 4;
const int BN_DOUBLECLICKED = 5;
// Edit control messages
#ifdef WIN32
#define EM_FIRST 0xB0
#else
#define EM_FIRST WM_USER
#endif
const int EM_GETSEL = EM_FIRST+0x0;
const int EM_SETSEL = EM_FIRST+0x1;
const int EM_GETRECT = EM_FIRST+0x2;
const int EM_SETRECT = EM_FIRST+0x3;
const int EM_SETRECTNP = EM_FIRST+0x4;
const int EM_LINESCROLL = EM_FIRST+0x6;
const int EM_GETMODIFY = EM_FIRST+0x8;
const int EM_SETMODIFY = EM_FIRST+0x9;
const int EM_GETLINECOUNT = EM_FIRST+0xA;
const int EM_LINEINDEX = EM_FIRST+0xB;
const int EM_SETHANDLE = EM_FIRST+0xC;
const int EM_GETHANDLE = EM_FIRST+0xD;
const int EM_GETTHUMB = EM_FIRST+0xE;
const int EM_LINELENGTH = EM_FIRST+0x11;
const int EM_REPLACESEL = EM_FIRST+0x12;
const int EM_SETFONT = EM_FIRST+0x13; // NOT IMPLEMENTED: use WM_SETFONT
const int EM_GETLINE = EM_FIRST+0x14;
const int EM_LIMITTEXT = EM_FIRST+0x15;
const int EM_SETLIMITTEXT = EM_FIRST+0x15; // Win40 Name change
const int EM_CANUNDO = EM_FIRST+0x16;
const int EM_UNDO = EM_FIRST+0x17;
const int EM_FMTLINES = EM_FIRST+0x18;
const int EM_LINEFROMCHAR = EM_FIRST+0x19;
const int EM_SETWORDBREAK = EM_FIRST+0x1A; // NOT IMPLEMENTED: use EM_SETWORDBREAK
const int EM_SETTABSTOPS = EM_FIRST+0x1B;
const int EM_SETPASSWORDCHAR = EM_FIRST+0x1C;
const int EM_EMPTYUNDOBUFFER = EM_FIRST+0x1D;
const int EM_GETFIRSTVISIBLELINE = EM_FIRST+0x1E;
const int EM_SETREADONLY = EM_FIRST+0x1F;
const int EM_SETWORDBREAKPROC = EM_FIRST+0x20;
const int EM_GETWORDBREAKPROC = EM_FIRST+0x21;
const int EM_GETPASSWORDCHAR = EM_FIRST+0x22;
#ifdef WIN32
const int EM_SETMARGINS = EM_FIRST+0x23;
const int EM_GETMARGINS = EM_FIRST+ 0x24;
const int EM_GETLIMITTEXT = EM_FIRST+ 0x25;
const int EM_POSFROMCHAR = EM_FIRST+ 0x26;
const int EM_CHARFROMPOS = EM_FIRST+ 0x27;
#endif
// typedef int (CALLBACK* EDITWORDBREAKPROC)(LPSTR lpch, int ichCurrent, int cch, int code);
// EDITWORDBREAKPROC code values
const int WB_LEFT = 0;
const int WB_RIGHT = 1;
const int WB_ISDELIMITER = 2;
// Edit control notification codes
const int EN_SETFOCUS = 0x0100;
const int EN_KILLFOCUS = 0x0200;
const int EN_CHANGE = 0x0300;
const int EN_UPDATE = 0x0400;
const int EN_ERRSPACE = 0x0500;
const int EN_MAXTEXT = 0x0501;
const int EN_HSCROLL = 0x0601;
const int EN_VSCROLL = 0x0602;
// Listbox messages
#ifdef WIN32
#define LB_FIRST 0x180
#else
#define LB_FIRST WM_USER + 1
#endif
const int LB_ADDSTRING = LB_FIRST+0x0;
const int LB_INSERTSTRING = LB_FIRST+0x1;
const int LB_DELETESTRING = LB_FIRST+0x2;
const int LB_SELITEMRANGEEX = LB_FIRST+0x3;
const int LB_RESETCONTENT = LB_FIRST+0x4;
const int LB_SETSEL = LB_FIRST+0x5;
const int LB_SETCURSEL = LB_FIRST+0x6;
const int LB_GETSEL = LB_FIRST+0x7;
const int LB_GETCURSEL = LB_FIRST+0x8;
const int LB_GETTEXT = LB_FIRST+0x9;
const int LB_GETTEXTLEN = LB_FIRST+0xA;
const int LB_GETCOUNT = LB_FIRST+0xB;
const int LB_SELECTSTRING = LB_FIRST+0xC;
const int LB_DIR = LB_FIRST+0xD;
const int LB_GETTOPINDEX = LB_FIRST+0xE;
const int LB_FINDSTRING = LB_FIRST+0xF;
const int LB_GETSELCOUNT = LB_FIRST+0x10;
const int LB_GETSELITEMS = LB_FIRST+0x11;
const int LB_SETTABSTOPS = LB_FIRST+0x12;
const int LB_GETHORIZONTALEXTENT = LB_FIRST+0x13;
const int LB_SETHORIZONTALEXTENT = LB_FIRST+0x14;
const int LB_SETCOLUMNWIDTH = LB_FIRST+0x15;
const int LB_ADDFILE = LB_FIRST+0x16;
const int LB_SETTOPINDEX = LB_FIRST+0x17;
const int LB_GETITEMRECT = LB_FIRST+0x18;
const int LB_GETITEMDATA = LB_FIRST+0x19;
const int LB_SETITEMDATA = LB_FIRST+0x1A;
const int LB_SELITEMRANGE = LB_FIRST+0x1B;
const int LB_SETANCHORINDEX = LB_FIRST+0x1C;
const int LB_GETANCHORINDEX = LB_FIRST+0x1D;
const int LB_SETCARETINDEX = LB_FIRST+0x1E;
const int LB_GETCARETINDEX = LB_FIRST+0x1F;
const int LB_SETITEMHEIGHT = LB_FIRST+0x20;
const int LB_GETITEMHEIGHT = LB_FIRST+0x21;
const int LB_FINDSTRINGEXACT= LB_FIRST+0x22;
#ifdef WIN32
const int LB_SETLOCALE = LB_FIRST+0x25;
const int LB_GETLOCALE = LB_FIRST+0x26;
const int LB_SETCOUNT = LB_FIRST+0x27;
const int LB_INITSTORAGE = LB_FIRST+0x28;
const int LB_ITEMFROMPOINT = LB_FIRST+0x29;
#endif
// Listbox notification codes
const int LBN_ERRSPACE = -2;
const int LBN_SELCHANGE = 1;
const int LBN_DBLCLK = 2;
const int LBN_SELCANCEL = 3;
const int LBN_SETFOCUS = 4;
const int LBN_KILLFOCUS = 5;
// Listbox notification messages
const int WM_VKEYTOITEM = 0x002E;
const int WM_CHARTOITEM = 0x002F;
// Listbox message return values
const int LB_OKAY = 0;
const int LB_ERR = -1;
const int LB_ERRSPACE = -2;
const long LB_CTLCODE = 0;
// Combo box messages
#ifdef WIN32
#define CB_FIRST 0x140
#else
#define CB_FIRST WM_USER
#endif
const int CB_GETEDITSEL = CB_FIRST+0x0;
const int CB_LIMITTEXT = CB_FIRST+0x1;
const int CB_SETEDITSEL = CB_FIRST+0x2;
const int CB_ADDSTRING = CB_FIRST+0x3;
const int CB_DELETESTRING = CB_FIRST+0x4;
const int CB_DIR = CB_FIRST+0x5;
const int CB_GETCOUNT = CB_FIRST+0x6;
const int CB_GETCURSEL = CB_FIRST+0x7;
const int CB_GETLBTEXT = CB_FIRST+0x8;
const int CB_GETLBTEXTLEN = CB_FIRST+0x9;
const int CB_INSERTSTRING = CB_FIRST+0xA;
const int CB_RESETCONTENT = CB_FIRST+0xB;
const int CB_FINDSTRING = CB_FIRST+0xC;
const int CB_SELECTSTRING = CB_FIRST+0xD;
const int CB_SETCURSEL = CB_FIRST+0xE;
const int CB_SHOWDROPDOWN = CB_FIRST+0xF;
const int CB_GETITEMDATA = CB_FIRST+0x10;
const int CB_SETITEMDATA = CB_FIRST+0x11;
const int CB_GETDROPPEDCONTROLRECT = CB_FIRST+0x12;
const int CB_SETITEMHEIGHT = CB_FIRST+0x13;
const int CB_GETITEMHEIGHT = CB_FIRST+0x14;
const int CB_SETEXTENDEDUI = CB_FIRST+0x15;
const int CB_GETEXTENDEDUI = CB_FIRST+0x16;
const int CB_GETDROPPEDSTATE = CB_FIRST+0x17;
const int CB_FINDSTRINGEXACT = CB_FIRST+0x18;
#ifdef WIN32
const int CB_SETLOCALE = CB_FIRST+0x19;
const int CB_GETLOCALE = CB_FIRST+0x1A;
const int CB_GETTOPINDEX = CB_FIRST+0x1B;
const int CB_SETTOPINDEX = CB_FIRST+0x1C;
const int CB_GETHORIZONTALEXTENT = CB_FIRST+0x1D;
const int CB_SETHORIZONTALEXTENT = CB_FIRST+0x1E;
const int CB_GETDROPPEDWIDTH = CB_FIRST+0x1F;
const int CB_SETDROPPEDWIDTH = CB_FIRST+0x20;
const int CB_INITSTORAGE = CB_FIRST+0x21;
#endif
// Combo box notification codes
const int CBN_ERRSPACE = -1;
const int CBN_SELCHANGE = 1;
const int CBN_DBLCLK = 2;
const int CBN_SETFOCUS = 3;
const int CBN_KILLFOCUS = 4;
const int CBN_EDITCHANGE = 5;
const int CBN_EDITUPDATE = 6;
const int CBN_DROPDOWN = 7;
const int CBN_CLOSEUP = 8;
const int CBN_SELENDOK = 9;
const int CBN_SELENDCANCEL = 10;
// Combo box message return values
const int CB_OKAY = 0;
const int CB_ERR = -1;
const int CB_ERRSPACE = -2;
const int WM_QUEUESYNC = 0x0023;
const int WM_COMMNOTIFY = 0x0044;
}